package com.ease.common.util;

import java.util.List;
import java.util.Random;

public abstract class RandomUtil extends Detect {

	private static final Random RANDOM = new Random();

	public static <E> E randomOne(List<E> list) {
		if (notEmpty(list)) {
			return list.get(RANDOM.nextInt(list.size()));
		}
		return (E) null;
	}

}
